<form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">
    <div class="layui-card-body">
        <div class="layui-form-item">
            <label class="layui-form-label label-required">用户姓名</label>
            <div class="layui-input-block">
                <input type="text" required autocomplete="off" autofocus name="name" value='{$vo.name|default=""}' placeholder="请输入姓名" class="layui-input">
                <!--<p class="color-desc">可选，用户姓名</p>-->
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label label-required">手机号码</label>
            <div class="layui-input-block">
                <!--{if isset($vo) and isset($vo.phone)}-->
                <input type="tel" maxlength="11" disabled value='{$vo.phone|default=""}' class="layui-input layui-bg-gray">
                <!--{else}-->
                <input type="tel" maxlength="11" name="phone" value='{$vo.phone|default=""}' required pattern="^1[3-9][0-9]{9}$" placeholder="请输入手机号码" class="layui-input">
                <!--{/if}-->
                <p class="color-desc">手机号码作为登陆唯一凭证，创建后不允许再次修改。</p>
            </div>
        </div>
    </div>
    <div class="hr-line-dashed"></div>
    <div class="layui-form-item text-center">
        {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>
    <script>
        window.form.render();
        function choosePosition() {
            window.layer.open({
                type: 2,
                title: '选择地址',
                area: ['750px', '480px'],
                content: '{:url("choose_position")}'
            })
        }
    </script>
</form>
